#pragma once

value struct PointVS
{
private:
	double y;

public:
	property double X;
	property double Y
	{
	public:
		double get()
		{
			return y;
		}
		void set(double value)
		{
			y = value;
		}
	}

	void PrintSelf()
	{
		System::Console::WriteLine("(x:{0},y:{1})",X,Y);
	}
};

ref class Process
{
private:
	static int _LastProcessID = 30;
public:
	static property int LastProcessID
	{
	public:
		int get()
		{
			return _LastProcessID;
		}
	protected:
		void set(int value)
		{
			_LastProcessID = value;
		}
	}
};

void Test1()
{
	PointVS p;
	p.X = 10;
	p.Y = 20;
	p.PrintSelf();

	Process pro;
	//pro.LastProcessID = 40;
	System::Console::WriteLine(pro.LastProcessID);
}